<template >
  <section>
    <label>{{label}}</label>
    <input key="input" v-bind:placeholder="placeholder">
  </section>
</template>

<script>
export default {
  name: "Vkey",
  props: ["type"],
  computed: {
    label() {
      return this.type === "username" ? "用户名" : "邮件";
    },
    placeholder() {
      return this.type === "username" ? "请输入用户名" : "请输入邮件";
    }
  }
};
</script>